<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>bonobo-main</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Libbonobo Reference Manual">
<link rel="up" href="general.html" title="General">
<link rel="prev" href="general.html" title="General">
<link rel="next" href="libbonobo-bonobo-running-context.html" title="BonoboRunningContext">
<meta name="generator" content="GTK-Doc V1.15.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="general.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Libbonobo Reference Manual</th>
<td><a accesskey="n" href="libbonobo-bonobo-running-context.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libbonobo-bonobo-main.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libbonobo-bonobo-main.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libbonobo-bonobo-main"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libbonobo-bonobo-main.top_of_page"></a>bonobo-main</span></h2>
<p>bonobo-main — Bonobo initialization.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libbonobo-bonobo-main.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libbonobo-bonobo-main.html#bonobo-is-initialized" title="bonobo_is_initialized ()">bonobo_is_initialized</a>               (<em class="parameter"><code><span class="type">void</span></code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libbonobo-bonobo-main.html#bonobo-init" title="bonobo_init ()">bonobo_init</a>                         (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **argv</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libbonobo-bonobo-main.html#bonobo-init-full" title="bonobo_init_full ()">bonobo_init_full</a>                    (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **argv</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_ORB</span> opt_orb</code></em>,
                                                         <em class="parameter"><code><span class="type">PortableServer_POA</span> opt_poa</code></em>,
                                                         <em class="parameter"><code><span class="type">PortableServer_POAManager</span> opt_manager</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libbonobo-bonobo-main.html#bonobo-debug-init" title="bonobo_debug_init ()">bonobo_debug_init</a>                   (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libbonobo-bonobo-main.html#bonobo-debug-print" title="bonobo_debug_print ()">bonobo_debug_print</a>                  (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> *fmt</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libbonobo-bonobo-main.html#bonobo-debug-shutdown" title="bonobo_debug_shutdown ()">bonobo_debug_shutdown</a>               (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libbonobo-bonobo-main.html#bonobo-main" title="bonobo_main ()">bonobo_main</a>                         (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libbonobo-bonobo-main.html#bonobo-main-quit" title="bonobo_main_quit ()">bonobo_main_quit</a>                    (<em class="parameter"><code><span class="type">void</span></code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="libbonobo-bonobo-main.html#bonobo-main-level" title="bonobo_main_level ()">bonobo_main_level</a>                   (<em class="parameter"><code><span class="type">void</span></code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libbonobo-bonobo-main.html#bonobo-activate" title="bonobo_activate ()">bonobo_activate</a>                     (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libbonobo-bonobo-main.html#bonobo-setup-x-error-handler" title="bonobo_setup_x_error_handler ()">bonobo_setup_x_error_handler</a>        (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">CORBA_ORB</span>           <a class="link" href="libbonobo-bonobo-main.html#bonobo-orb" title="bonobo_orb ()">bonobo_orb</a>                          (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">PortableServer_POA</span>  <a class="link" href="libbonobo-bonobo-main.html#bonobo-poa" title="bonobo_poa ()">bonobo_poa</a>                          (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">PortableServer_POAManager</span>  <a class="link" href="libbonobo-bonobo-main.html#bonobo-poa-manager" title="bonobo_poa_manager ()">bonobo_poa_manager</a>           (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">PortableServer_POA</span>  <a class="link" href="libbonobo-bonobo-main.html#bonobo-poa-get-threaded" title="bonobo_poa_get_threaded ()">bonobo_poa_get_threaded</a>             (<em class="parameter"><code><span class="type">ORBitThreadHint</span> hint</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-main.description"></a><h2>Description</h2>
<p>
  Initialization functions for Bonobo applications.
</p>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-main.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="bonobo-is-initialized"></a><h3>bonobo_is_initialized ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            bonobo_is_initialized               (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
This allows you to protect against double
initialization in your code.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> whether the ORB is initialized
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-init"></a><h3>bonobo_init ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            bonobo_init                         (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **argv</code></em>);</pre>
<p>
Initializes the bonobo component model.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
<td>a pointer to the number of arguments or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td>the array of arguments or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-init-full"></a><h3>bonobo_init_full ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            bonobo_init_full                    (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **argv</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_ORB</span> opt_orb</code></em>,
                                                         <em class="parameter"><code><span class="type">PortableServer_POA</span> opt_poa</code></em>,
                                                         <em class="parameter"><code><span class="type">PortableServer_POAManager</span> opt_manager</code></em>);</pre>
<p>
Initializes the bonobo document model.  It requires at least
the value for <em class="parameter"><code>orb</code></em>.  If <em class="parameter"><code>poa</code></em> is CORBA_OBJECT_NIL, then the
RootPOA will be used, in this case <em class="parameter"><code>manager</code></em> should be CORBA_OBJECT_NIL.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
<td>a pointer to the number of arguments
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td>the array of arguments
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opt_orb</code></em> :</span></p></td>
<td>the ORB in which we run
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opt_poa</code></em> :</span></p></td>
<td>optional, a POA
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opt_manager</code></em> :</span></p></td>
<td>optional, a POA Manager
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-debug-init"></a><h3>bonobo_debug_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                bonobo_debug_init                   (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-debug-print"></a><h3>bonobo_debug_print ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                bonobo_debug_print                  (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> *fmt</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fmt</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-debug-shutdown"></a><h3>bonobo_debug_shutdown ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 bonobo_debug_shutdown               (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
This shuts down the ORB and any other bonobo related
resources.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> whether the shutdown was clean, a good
value to return from 'main'.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-main"></a><h3>bonobo_main ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                bonobo_main                         (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Activates the Bonobo POA Manager and enters the main event loop.
</p>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-main-quit"></a><h3>bonobo_main_quit ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                bonobo_main_quit                    (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Quits the main event loop.
</p>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-main-level"></a><h3>bonobo_main_level ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               bonobo_main_level                   (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Determines the number of times the bonobo main loop has been entered (minus
the number of exits from the main loop).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The number of main loops currently running (0 if no main loops are
running).
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-activate"></a><h3>bonobo_activate ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            bonobo_activate                     (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Activates the Bonobo POA manager registered by bonobo_init.
This should be called at the end of application initialization.
You do not need to call this function if you use <a class="link" href="libbonobo-bonobo-main.html#bonobo-main" title="bonobo_main ()"><code class="function">bonobo_main()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-setup-x-error-handler"></a><h3>bonobo_setup_x_error_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                bonobo_setup_x_error_handler        (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-orb"></a><h3>bonobo_orb ()</h3>
<pre class="programlisting"><span class="returnvalue">CORBA_ORB</span>           bonobo_orb                          (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The ORB used for this Bonobo application.  The ORB
is created in <a class="link" href="libbonobo-bonobo-main.html#bonobo-init" title="bonobo_init ()"><code class="function">bonobo_init()</code></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-poa"></a><h3>bonobo_poa ()</h3>
<pre class="programlisting"><span class="returnvalue">PortableServer_POA</span>  bonobo_poa                          (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The POA used for this Bonobo application.  The POA
is created when <a class="link" href="libbonobo-bonobo-main.html#bonobo-init" title="bonobo_init ()"><code class="function">bonobo_init()</code></a> is called.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-poa-manager"></a><h3>bonobo_poa_manager ()</h3>
<pre class="programlisting"><span class="returnvalue">PortableServer_POAManager</span>  bonobo_poa_manager           (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The POA Manager used for this Bonobo application.  The POA
Manager is created when <a class="link" href="libbonobo-bonobo-main.html#bonobo-init" title="bonobo_init ()"><code class="function">bonobo_init()</code></a> is called, but it is not
activated until <a class="link" href="libbonobo-bonobo-main.html#bonobo-main" title="bonobo_main ()"><code class="function">bonobo_main()</code></a> is called.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-poa-get-threaded"></a><h3>bonobo_poa_get_threaded ()</h3>
<pre class="programlisting"><span class="returnvalue">PortableServer_POA</span>  bonobo_poa_get_threaded             (<em class="parameter"><code><span class="type">ORBitThreadHint</span> hint</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Get a predefined POA for a given threading policy/hint.  The
returned POA can be passed as the "poa" constructor property of a
<span class="type">BonoboOject</span>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hint</code></em> :</span></p></td>
<td>the desired thread hint
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the requested POA.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15.1</div>
</body>
</html>